home *** CD-ROM | disk | FTP | other *** search
/ Acorn Risc Technologies StrongARM CD-ROM / Acorn Risc Technologies StrongARM CD-ROM.iso / ftp / documents / appnotes / 016_030 / 028c / Text
Encoding:
Text File  |  1993-08-02  |  5.9 KB  |  149 lines

  1. 9th January 1992
  2. -----------------------------------------------------------------------------
  3. Support Group Application Note 
  4. Number: 028
  5. Issue: 1 
  6. Author:
  7. -----------------------------------------------------------------------------
  8.  
  9. Issue II BASIC
  10.  
  11. -----------------------------------------------------------------------------
  12. Applicable Hardware: BBC B
  13.  
  14. Related Application Notes:
  15.  
  16.  
  17. -----------------------------------------------------------------------------
  18. Copyright (C) Acorn Computers Limited 1992
  19.  
  20. Every effort has been made to ensure that the information in this leaflet is 
  21. true and correct at the time of printing. However, the products described in
  22. this leaflet are subject to continuous development and improvements and
  23. Acorn Computers Limited reserves the right to change its specifications at
  24. any time. Acorn Computers Limited cannot accept liability for any loss or
  25. damage arising from the use of any information or particulars in this
  26. leaflet. ACORN, ECONET and ARCHIMEDES are trademarks of Acorn Computers
  27. Limited.
  28. -----------------------------------------------------------------------------
  29. Support Group
  30. Acorn Computers Limited
  31. Acorn House
  32. Vision Park
  33. Histon
  34. Cambridge       CB4 4AE
  35. -----------------------------------------------------------------------------
  36.  
  37.  
  38. The new version of BASIC's differences with the old version are as follows:
  39.  
  40. 1       ELSE no longer leaves a byte on the hardware stack in ON. . .
  41. GOTO/GOSUB.
  42.  
  43. 2       INSTR no longer leaves the shorter string of INSTR ("AB", "ABC") on
  44. the Software stack.
  45.  
  46. 3       The lexical analyser is now called correctly from EVAL so that
  47. EVAL("TIME") works.
  48.  
  49. 4       ABS can take the absolute value of integers without bit 31 set
  50. without returning a string
  51.         (ie PRINT -ABS 1 works).
  52.  
  53. 5       ASC" : " can be used in the assembler without confusing it.
  54.  
  55. 6       A new statement OSCLI has been introduced, shortest abbreviation
  56. OS., token value &FF. It takes a string expression and gives it to the
  57. operating system, eg OSCLI "KEY "+STR$Z+"
  58. This is key "STR$Z.  It has no unique errors of its own, just the normal
  59. "Type mismatch" error.
  60.  
  61. 7       The value of the token for  OPENIN has changed to &BE and now just
  62. opens files for input only using the &40 open.  A new keyboard openup (open
  63. for update) has been introduced with the old taken value &AD which opens
  64. files for update using the &CO open.  This results in old programs
  65. automatically changing to OPENUP when they are LOADed into the new
  66. interpreter.
  67.  
  68. 8       The next bit in OPT (OPTs 4 to 7)  controls whether code generated
  69. by the assembler will be put at the program counter P% or at the code
  70. original O%.  If it is set code will be put at O% and both O% and P%
  71. incremented, if unset only P% will be used.  Current implementation results
  72. in all OPTs greater than 3 causing code to be put at O%.
  73.  
  74. 9       The LN and LOG functions are completely recoded to make them more
  75. accurate and to avoid the LN(2E-39) bug.
  76.  
  77. 10      The fix routine avoids the INT1E38 bug.
  78.  
  79. 11      The SIN/COS functions are completely recoded to make them more accurate.
  80.  
  81. 12      The binary to decimal string conversion routines, used for PRINT and
  82. STR$, have been changed to allow the use of 10 figures of precision on
  83. printing.  The initial value of @% is now &0000090A to give the same results
  84. on startup.  Note that @%=10 now gives the internal default of 10 figures. 
  85. The changes allow the maximum positive integer 214783647 to be printed out
  86. (and indeed get 2^32 right).  STR$ when not controlled by @% uses the new 10
  87. figure default which will result in it giving different answers to before eg
  88. 7.7 (a recurring binary fraction) will be converted to 7.699999999.
  89.  
  90. 13      Four new operations are available in the assembler.  These are EQUB,
  91. EQUW, EQUD, EQUS.  They have no errors of their own apart from the Type
  92. Mismatch error.  They take a single argument and put its value into the
  93. assembly code.  EQUS puts all the characters of a string into the code
  94. WITHOUT a carriage return like $P%; if you need a carriage return just add
  95. it to the string.  EQUS may be used together with FN to implement macros as
  96. shown in this example:
  97.  
  98.                 DEF FNOSBYTE  (A,X,Y)
  99.                 IF A>127  [OPT Z:LDY£Y:1]
  100.                 [OPT Z:LDX£X:LDA£A:JSR&FFF4:]
  101.                 =""
  102.  
  103.                 [OPT Z
  104.                 EQUS FNOSBYTE(&99,33,44)
  105.                 EQUS FNOSBYTE(2,1,0)
  106.                 ]
  107.  
  108. 14      The startup REPORT is the way to tell the new version of BASIC from
  109. the old one, the new one has (c) 1982.
  110.  
  111. 15      The bug associated with ON ERROR GOTO 9999 has been removed.
  112.  
  113. 16      A MODE change now resets COUNT.
  114.  
  115. 17      BASIC will now only execute if A contains 1 on entry at 8000.  There
  116. is no entry at 8003 any more.
  117.  
  118. 18      BASIC is of type 60;  this means that it contains its own tube
  119. relocation address after all the standard sideways ROM items.  Of course,
  120. with the general release this will be 00008000 (the default for no
  121. relocation) but this gives more trouble free production of relocated
  122. versions to run at 0000B000.
  123.  
  124. 19      The version number is 01.
  125.  
  126. 20      In INPUT ';' is introduced and functions as the ',' does.
  127.  
  128. 21      Fatal errors have been introduced.  Errors whose ERR is zero causes
  129. an ON ERROR OFF effect while they are being processed.
  130.  
  131. 22      STOP has been redefined as a fatal error, this causes the STOP at
  132. line 0 message to be corrected to STOP.
  133.  
  134. 23      The "No room" error is a fatal error.
  135.  
  136. 24      The standard error handling procedures do not use stack any more. 
  137. The situation of running out of all free space no longer causes error
  138. messages to be printed out following by a "No room" message.
  139.  
  140. 25      The allocation of space for strings has been made slightly more
  141. efficient, it can cope with REPEAT A$=A$+"*": UNTIL LEN A$ = 255 and only
  142. allocate 255 bytes.  It still has problems if B$ is being done alternately
  143. with A$.
  144.  
  145. 26      A new error 45 "Missing £" arrives if PTR, EOF, BGET, BPUT, EXT have
  146. a missing £.
  147.  
  148. 27      DIM P% -2 gives Bad DIM.
  149.